package com.visizen.wisdomclass.server.client;

import com.visizen.wisdomclass.server.model.WcLocateRangeinfo;
import com.visizen.wisdomclass.server.model.WcLocateRangeinfoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface WcLocateRangeinfoMapper {
    @SelectProvider(type=WcLocateRangeinfoSqlProvider.class, method="countByExample")
    int countByExample(WcLocateRangeinfoExample example);

    @DeleteProvider(type=WcLocateRangeinfoSqlProvider.class, method="deleteByExample")
    int deleteByExample(WcLocateRangeinfoExample example);

    @Delete({
        "delete from wc_locate_rangeinfo",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long ID);

    @Insert({
        "insert into wc_locate_rangeinfo (ID, SET_ID, ",
        "LONGITUDE, Latitude)",
        "values (#{ID,jdbcType=BIGINT}, #{SET_ID,jdbcType=BIGINT}, ",
        "#{LONGITUDE,jdbcType=INTEGER}, #{latitude,jdbcType=INTEGER})"
    })
    int insert(WcLocateRangeinfo record);

    @InsertProvider(type=WcLocateRangeinfoSqlProvider.class, method="insertSelective")
    int insertSelective(WcLocateRangeinfo record);

    @SelectProvider(type=WcLocateRangeinfoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="SET_ID", property="SET_ID", jdbcType=JdbcType.BIGINT),
        @Result(column="LONGITUDE", property="LONGITUDE", jdbcType=JdbcType.INTEGER),
        @Result(column="Latitude", property="latitude", jdbcType=JdbcType.INTEGER)
    })
    List<WcLocateRangeinfo> selectByExample(WcLocateRangeinfoExample example);

    @Select({
        "select",
        "ID, SET_ID, LONGITUDE, Latitude",
        "from wc_locate_rangeinfo",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="ID", property="ID", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="SET_ID", property="SET_ID", jdbcType=JdbcType.BIGINT),
        @Result(column="LONGITUDE", property="LONGITUDE", jdbcType=JdbcType.INTEGER),
        @Result(column="Latitude", property="latitude", jdbcType=JdbcType.INTEGER)
    })
    WcLocateRangeinfo selectByPrimaryKey(Long ID);

    @UpdateProvider(type=WcLocateRangeinfoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") WcLocateRangeinfo record, @Param("example") WcLocateRangeinfoExample example);

    @UpdateProvider(type=WcLocateRangeinfoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") WcLocateRangeinfo record, @Param("example") WcLocateRangeinfoExample example);

    @UpdateProvider(type=WcLocateRangeinfoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(WcLocateRangeinfo record);

    @Update({
        "update wc_locate_rangeinfo",
        "set SET_ID = #{SET_ID,jdbcType=BIGINT},",
          "LONGITUDE = #{LONGITUDE,jdbcType=INTEGER},",
          "Latitude = #{latitude,jdbcType=INTEGER}",
        "where ID = #{ID,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(WcLocateRangeinfo record);
}